package com.zkr.kqsx.mapper;

import com.zkr.kqsx.model.KQSXSelectVo;
import com.zkr.kqsx.model.KQSXVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *Created by lenovo on 2021/01/14.
 */
@Mapper
public interface KQSXMapper {
    int queryCount(KQSXSelectVo kqsxSelectVo);

    List<KQSXVo> queryPage(KQSXSelectVo kqsxSelectVo);

    @Select("select * from eulogy where code=#{code}")
    KQSXVo queryCode(String code);

    @Select("select * from eulogy where name=#{name}")
    KQSXVo queryName(String name);

    @Insert("insert into eulogy(name,code,remark,status,createName,createTime,updateName,updateTime)"+
    "values(#{code},#{name},#{remark},#{status},#{createName},#{createTime},#{updateName},#{updateTime})")
    void add(KQSXVo kqsxVo);


    void updateStatus(KQSXVo kqsxVo);

    void update(KQSXVo kqsxVo);

    /*int queryCount(KuFangSelectVo kuFangSelectVo);

    List<KQSXVo> queryPage(KuFangSelectVo kuFangSelectVo);

    @Select("select * from kufang where code=#{code} ")
    KQSXVo queryCode(@NotNull(message = "库房标识编码不能为空!") String code);

    @Select("select * from kufang where name=#{code}")
    KQSXVo queryName(@NotNull(message = "库房标识名称不能为空!") String name);

    @Insert("insert into kufang(name,code,remark,status,createName,createTime,updateName,updateTime)"+
    "values(#{name},#{code},#{remark},#{status},#{createName},#{createTime},#{updateName},#{updateTime})")
    void insertkufang(KQSXVo kuFangVo);

    void updateStatus(KQSXVo kuFangVo);



    @Select("select * from kufang where remark=#{remark}")
    KQSXVo queryRemark(String remark);

    void update(KQSXVo kuFangVo1);

    //int update(KFSZVo kuFangVo1);*/




}
